<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=yes" />
        <title>橡木匣子/首页</title>
        <script src="/public/design/js/jquery-1.11.3.js" type="text/javascript" charset="utf-8"></script>
        <script src="/public/design/js/jquery.masonry.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="/public/design/js/jquery.autocomplete.js" type="text/javascript" charset="utf-8"></script>
        <link rel="stylesheet" type="text/css" href="/public/design/css/styles.css"/>
        <link rel="stylesheet" type="text/css" href="/public/design/home.css"/>
    </head>

    <body>
        <div id="container">
            #{include '_nav.html'/}
            <div id="pageContent">

                <div id="content">

                    <!--最新部分内容-->
                    <div class="ziLiaoZhanShi" id="zuiXin">
                        <div id="pubul">
                            <ul>
                                #{list posts, as: 'post' }
                                <li class="box">
                                    <a href="@{App.view_post(post.id)}">
                                        <div class="b_pic">
                                            #{if post.images}
                                            <img src="@{Resources.raw(post.images.split(',')[0], '')}" style="border-radius:10px;" />
                                            #{/if}
                                        </div>
                                        <div class="b_text">
                                            <div class="tit">
                                                ${post.subject}
                                            </div>
                                            <ul class="biaoqian">
                                                #{list post.tags, as: 'tag'}
                                                <li><a href="#">${tag.name}</a></li>
                                                #{/list}
                                            </ul>
                                            <ul class="zanGuanzhu">
                                                <li class="zanImg"><img src="/public/design/img/home/tab_like.png" /></li>
                                                <li class="zanCounts">30</li>
                                                <li class="guanzhuImg"><img src="/public/design/img/home/tab_collect.png" /></li>
                                                <li class="guanzhuCounts">30</li>
                                            </ul>
                                            <div class="jieShao" style="text-overflow: ellipsis;"><!--style="text-overflow: ellipsis;"-->
                                                ${post.summary}
                                            </div>
                                        </div>
                                    </a>
                                </li>
                                #{/list}

                                <li class="box">
                                    <a href="ziLiaoXiangQing.html">
                                        <div class="b_pic">
                                            <img src="/public/design/img/home/u204.png" />
                                        </div>
                                        <div class="b_text">
                                            <div class="tit">
                                                现代梦幻酒吧室内设计
                                            </div>
                                            <ul class="biaoqian">
                                                <li><a href="#">建筑设计</a></li>

                                                <li><a href="#">室内设计</a></li>

                                                <li><a href="#">商业地产</a></li>
                                            </ul>
                                            <ul class="zanGuanzhu">
                                                <li class="zanImg"><img src="/public/design/img/home/tab_like.png" /></li>
                                                <li class="zanCounts">30</li>
                                                <li class="guanzhuImg"><img src="/public/design/img/home/tab_collect.png" /></li>
                                                <li class="guanzhuCounts">30</li>
                                            </ul>
                                            <div class="jieShao" style="text-overflow: ellipsis;">
                                                上升的建筑，用于杭州亚运会，本人历经1年多时间，经过
                                            </div>
                                        </div>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            #{include '_footer.html'/}
        </div>
        <script type="text/javascript">
            $(function () {
                $(window).resize(function () {
                    location.reload(true);
                });

                //实现瀑布流插件
                var $container = $('#pubul');
                $container.imagesLoaded(function () {
                    $container.masonry({
                        itemSelector: '.box',
                        columnWidth: 5 //每两列之间的间隙为5像素
                    });
                });


                $(".userinfo").hover(function () {
                    $(".info").slideDown("fast");
                }, function () {
                    $(".info").slideUp("10");
                })


                //及时搜索
                var countries = [
                    {value: '分类:室内', data: '室内'},
                    {value: '室内设计', data: ''},
                    {value: '室内装修', data: '室内'},
                    {value: '室内环保', data: '室内'},
                    {value: '室内设计', data: '室内'},
                    {value: '室内设计', data: '室内'},
                    {value: '话题:室内', data: '室内'},
                    {value: '某宾馆室内设计', data: '室内'},
                    {value: '某大厦室内设计', data: '室内'},
                    {value: '资料:室内', data: '室内'},
                    {value: '某宾馆室内设计', data: '室内'},
                    {value: '某大厦室内设计', data: '室内'},
                    {value: '某宾馆室内设计', data: '室内'},
                    {value: '某大厦室内设计', data: '室内'},
                    {value: '更多室内相关资料...', data: '室内'},
                    // ...
                    {value: 'Zimbabwe', data: 'ZZ'}
                ];

                $('#autocomplete').autocomplete({
                    lookup: countries,
                    onSelect: function (suggestion) {
                        /*  alert('You selected: ' + suggestion.value + ', ' + suggestion.data);*/
                        window.open("souSuojieguo.html");
                    },
                    autoFill: true,
                });

            })
        </script>
    </body>
</html>
